Conversation
|
This PR/issue depends on:
|
b8c68c8 to
0f38cca
Compare
|
There was a problem hiding this comment.
Pull request overview
Updates Drive to use the new AppLock APIs introduced in the core submodule (replacing LockActivity usage with AppLockManager / AppLockViewActivity).
Changes:
- Replace legacy
LockActivitycalls withAppLockManagerequivalents (biometric availability, unlock, scheduling). - Update lock screen activity class reference to
AppLockViewActivity(including manifest). - Bump
Coresubmodule to a commit containing the AppLock refactor.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/com/infomaniak/drive/ui/menu/settings/SettingsFragment.kt | Switch biometrics check from LockActivity to AppLockManager. |
| app/src/main/java/com/infomaniak/drive/ui/menu/settings/AppSecuritySettingsActivity.kt | Migrate unlock + helper import to new AppLock API. |
| app/src/main/java/com/infomaniak/drive/ui/SaveExternalFilesActivity.kt | Use AppLockManager.scheduleLockIfNeeded with AppLockViewActivity. |
| app/src/main/java/com/infomaniak/drive/ui/MainActivity.kt | Use AppLockManager.scheduleLockIfNeeded with AppLockViewActivity (plus new import). |
| app/src/main/AndroidManifest.xml | Point lock activity declaration at AppLockViewActivity. |
| Core | Updates core submodule revision to include AppLock changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import kotlinx.coroutines.withContext | ||
| import javax.inject.Inject | ||
| import kotlin.coroutines.resume | ||
| import kotlin.jvm.java |
There was a problem hiding this comment.
import kotlin.jvm.java is typically not needed to use ::class.java on Android/Kotlin JVM (and may be flagged as an unused import by lint/ktlint if it isn't required by your compiler settings). Consider removing it unless this file genuinely needs the explicit import.
| import kotlin.jvm.java |
| AppLockManager.scheduleLockIfNeeded( | ||
| targetActivity = this, | ||
| lockActivityCls = AppLockViewActivity::class.java, | ||
| isAppLockEnabled = { AppSettings.appSecurityLock } | ||
| ) |
There was a problem hiding this comment.
The new lockActivityCls = AppLockViewActivity::class.java parameter is now required at call sites and is repeated (also in SaveExternalFilesActivity). To reduce duplication and avoid future drift if the lock activity changes again, consider centralizing this into a shared constant (e.g., in AppLockManager/AppSettings) or a small wrapper method in your app module.



Apply changes of AppLock on core : Infomaniak/android-core#715
Depends on Infomaniak/android-core#715